#!/bin/bash
if [[ $(whoami) != "lfs" ]]; then
	echo "Please log in as user lfs...";
	exit 1;
fi
cd $LFS/sources/pkg || exit 1
source ./utils.sh || exit 2

strip --strip-debug /tools/lib/* && \
/usr/bin/strip --strip-unneeded /tools/{,s}bin/*

if (($? != 0)); then
	errcho "Something went wrong while stripping packages... see log messages.";
	errcho "Messages like: '... File format not recognized' or '... is not an ordinary file' or OK";
	exit 1;
fi
